package cn.kgc.service.impl;

import java.util.List;

import cn.kgc.pojo.News;
import cn.kgc.pojo.NewsCategory;
import cn.kgc.service.NewsCategoryService;
import cn.kgc.service.NewsService;

public class Test {
	public static void main(String[] args) {
		/*//测试一下新闻分类的删除
		NewsCategory newsCategory = new NewsCategory();
		newsCategory.setId(7);
		
		NewsCategoryService newsCategoryService = new NewsCategoryServiceImpl();
		newsCategoryService.deleteNewsCategory(newsCategory);*/
		
		//测试分页
		NewsService service = new NewsServiceImpl();
//		System.out.println(service.getTotalCount());
		
		List<News> list = service.getPageNewsList(1,3);
		for(News news:list){
			System.out.println(news.getId()+"-"+news.getTitle());
		}
	}
}
